# -*- coding: utf-8 -*-
# @Time    : 2021/9/8 23:11
# @Author  : BrandonGT
# @FileName: 3_4_guest_list.py

names = [
    "wang qi",
    "ma rui",
    "xu si ting"
]

print(f"{names}\n")

# changing list use del and insert
del names[0]
names.insert(0, "zhang chun hui")
print(f"{names}\n")

# changing list by []
names[1] = "xu meng yao"
print(f"{names}\n")

# changing list by pop and append
last_name = names.pop()
new_name = f"{last_name} junior"
names.append(new_name)
print(f"{names}\n")

for name in names:
    message = f"I would like invite {name.title()} to dinner!"
    print(message)